package com.kevin.ejb3;

import javax.ejb.Local;
import javax.ejb.Remote;
import javax.ejb.Stateless;

/**
 * Created by loli on 2015/3/15.
 */
@Stateless
@Remote({Operation.class})
@Local({LocalOperation.class})
public class OperationBean implements Operation, LocalOperation{
    private int total;
    private int addResult;

    public int add(int a, int b){
        addResult = a + b;
        return addResult;
    }

    public int getResult(){
        total = total + addResult;
        return total;
    }
}
